package model;

/**
 * Represents an item that can appear in the address bar list of entries. This item can represent a folder, a
 * tagged file or a shell command. 
 * @author Shahriar Haque
 *
 */
public class ListItem implements Comparable<ListItem> {
	
	private String name;
	private String description;
	private int hitCount;
	public int type; // type 0 to indicate folder
	
	
	public ListItem(String name, String path){
		this.name = name;
		this.description = path;
		hitCount = 0;
		type = 0;
	}
	
	public void incrementHit(){
		hitCount++;
	}

	public int getHitCount() {
		return hitCount;
	}

	public String getName() {
		return name;
	}

	public String getDescription() {
		return description;
	}

	public int compareTo(ListItem f) {
		return hitCount - f.hitCount;
	}
	
	

}
